/******************************
EXAMPLE STYLES
******************************/
.noscroll {
  overflow: hidden;
  height: 100%;
  width: 100%;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  z-index: 9999;
  visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  display: block;
  width: 94%;
  max-width: 740px;
  margin: 36px auto 0;
}

.close {
  position: absolute;
  top: 0%;
  right: 0%;
  font-size: 36px;
}

/* Main Nav */
.nav {
  width: 80%;
  max-width: 420px;
  margin: 90px auto 90px;
  font-size: 33px;
}

.nav-el {
  position: relative;
  display: inline-block;
  float: right;
  width: 47.5%;
  padding-bottom: 47.5%;
  color: white;
  z-index: 10;
  /* Placements */
}
.nav-el [class^="icon-"], .nav-el [class*=" icon-"] {
  position: absolute;
  top: 50%;
  left: 50%;
  line-height: 0;
  margin-left: -0.5em;
}
.nav-el.active_reverse {
  z-index: 11;
  background: transparent;
}
.nav-el.inactive {
  pointer-events: none;
  cursor: default;
}
.nav-el:nth-of-type(2n+1) {
  float: left;
}
.nav-el:nth-of-type(n+3) {
  margin-top: 5%;
}

/* A fix for Safari and .nav-el z-index:
	when animation starts, the square appear bellow other .nav-el
  	even if it has a bigger z-index */
.demo3_cont {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* Space adjustment  */
@media only screen and (min-width: 520px) {
  .nav {
    font-size: 48px;
  }
}
@media only screen and (min-width: 768px) {
  .overlay .wrap {
    margin: 150px auto 0;
  }
}
/******************************
COLORS
******************************/
/* demo1 */
body.dm-demo1 {
  background: #1abc9c;
}
body.dm-demo1 .button {
  color: #1abc9c;
  background: #16a085;
}
body.dm-demo1 .button:hover {
  background-color: #107360;
}
body.dm-demo1 .overlay {
  background-color: #107360;
}
body.dm-demo1 .nav-el {
  background-color: #16a085;
  transition: background-color .3s ease-in;
  -moz-transition: background-color .3s ease-in;
  -webkit-transition: background-color .3s ease-in;
}
body.dm-demo1 .nav-el:hover, body.dm-demo1 .nav-el.active {
  background: #107360;
}
body.dm-demo1 .nav-el.active {
  z-index: 11;
}
body.dm-demo1 .backtoarticle {
  border-color: #16a085;
  color: #16a085;
}
body.dm-demo1 .backtoarticle:hover {
  color: #107360;
  border-color: #107360;
}

/* demo2 */
body.dm-demo2 {
  background: #3498db;
}
body.dm-demo2 .button {
  color: #3498db;
  background: #2980b9;
}
body.dm-demo2 .button:hover {
  background-color: #20638f;
}
body.dm-demo2 .overlay {
  background-color: #20638f;
}
body.dm-demo2 .nav-el {
  background-color: #2980b9;
  transition: background-color .3s ease-in;
  -moz-transition: background-color .3s ease-in;
  -webkit-transition: background-color .3s ease-in;
}
body.dm-demo2 .nav-el:hover, body.dm-demo2 .nav-el.active {
  background: #20638f;
}
body.dm-demo2 .nav-el.active {
  z-index: 11;
}
body.dm-demo2 .backtoarticle {
  border-color: #2980b9;
  color: #2980b9;
}
body.dm-demo2 .backtoarticle:hover {
  color: #20638f;
  border-color: #20638f;
}

/* demo3 */
body.dm-demo3 {
  background: #9b59b6;
}
body.dm-demo3 .button {
  color: #9b59b6;
  background: #8e44ad;
}
body.dm-demo3 .button:hover {
  background-color: #703688;
}
body.dm-demo3 .overlay {
  background-color: #703688;
}
body.dm-demo3 .nav-el {
  background-color: #8e44ad;
  transition: background-color .3s ease-in;
  -moz-transition: background-color .3s ease-in;
  -webkit-transition: background-color .3s ease-in;
}
body.dm-demo3 .nav-el:hover, body.dm-demo3 .nav-el.active {
  background: #703688;
}
body.dm-demo3 .nav-el.active {
  z-index: 11;
}
body.dm-demo3 .backtoarticle {
  border-color: #8e44ad;
  color: #8e44ad;
}
body.dm-demo3 .backtoarticle:hover {
  color: #703688;
  border-color: #703688;
}

/* demo4 */
body.dm-demo4 {
  background: #34495e;
}
body.dm-demo4 .button {
  color: #34495e;
  background: #2c3e50;
}
body.dm-demo4 .button:hover {
  background-color: #1a242f;
}
body.dm-demo4 .overlay {
  background-color: #1a242f;
}
body.dm-demo4 .nav-el {
  background-color: #2c3e50;
  transition: background-color .3s ease-in;
  -moz-transition: background-color .3s ease-in;
  -webkit-transition: background-color .3s ease-in;
}
body.dm-demo4 .nav-el:hover, body.dm-demo4 .nav-el.active {
  background: #1a242f;
}
body.dm-demo4 .nav-el.active {
  z-index: 11;
}
body.dm-demo4 .backtoarticle {
  border-color: #2c3e50;
  color: #2c3e50;
}
body.dm-demo4 .backtoarticle:hover {
  color: #1a242f;
  border-color: #1a242f;
}